from config.database import BaseEntity
from sqlalchemy import DECIMAL, BigInteger, Column, Integer, Numeric, String


class Demo(BaseEntity):
    """
    测试表
    """

    __tablename__ = 't_demo'

    code = Column(String(10), nullable=False, index=True, comment='编码')
    name = Column(String(50), nullable=False, comment='名称')
    age = Column(Integer, nullable=False, comment='年龄')
    money = Column(DECIMAL, nullable=False, comment='金额')


class InCome(BaseEntity):
    """
    收入表
    """

    __tablename__ = 't_income'

    busDate = Column(String(10), nullable=False, index=True, comment='日期')
    orgId = Column(BigInteger, nullable=False, comment='部门Id')
    inMoney = Column(Numeric(precision=10, scale=2), nullable=False, comment='金额')
    nums = Column(Integer, nullable=False, comment='数量')
